<template>
	<view>
		<card :title="title">
			<block v-for="(item, i) of activeList" :key="i">
				<hdlistItem :item="item" :index="i" @callBack="callBackComponent" :componentKey="componentKey"/>
			</block>
		</card>
		
		<u-loadmore :status="statesType" :icon-type="iconType" :load-text="loadText"/>
	</view>
</template>

<script>
import card from '@/components/common/card.vue';
import hdlistItem from '../common/list_item.vue';

export default {
	props: {
		title: {
			type: String,
			default: () => '最新活动'
		},
		activeList: {
			type: Array,
			default: () => []
		},
		statesType:{
			type:String,
			default:()=>'loadmore'
		},
		componentKey:{
			type:String,
			default:()=>'yq'
		}
	},
	data() {
		return {
			iconType: 'flower',
				loadText: {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '实在没有了'
				}
		};
	},

	components: {
		card,
		hdlistItem
	},
	methods: {
		callBackComponent(params) {
			if (params.function) {
				this.$emit('callBack', params);
			}
		}
	}
};
</script>

<style lang="scss" scoped></style>
